<?php
/**
 * 
 *
 * PHP version 5.3.x
 *
 * @category 
 * @package  
 * @author   gouki <gouki.xiao@gmail.com>
 */

/**
 * SaeCommon.php
 *
 * @category 
 * @package  
 * @author   gouki <gouki.xiao@gmail.com>
 * @version $Id$ 
 * @created 2011-11-22 00:21
 */ 
class SaeCommon extends CComponent{
    static protected $_saeSettings;
    static public function getSaeConfig($key=null){
        if(!self::$_saeSettings && isset(Yii::app()->params['sae'])){
            self::$_saeSettings = Yii::app()->params['sae'];
        }
        if(isset(self::$_saeSettings[$key])){
            return self::$_saeSettings[$key];
        }
        return self::$_saeSettings;
    }

    static public function getSaeStorage($type){
        $saeSettings = self::getSaeConfig();
        if(isset($saeSettings['storage'][$type])){
             return $saeSettings['storage'][$type];
        }
    }
}
